<?php 
	$games = $this->gamesList;
?>
<div class="border">
	<div class="title"><?php echo __("Schedule"); ?></div>
	<div class="content">
		<?php foreach ( $games as $year => $tab ) : ?> 
		<div class="title"><?php echo $year; ?></div>
		<table cellpadding="2" cellspacing="2" border="0" class="score" width="100%">
			<tr>
				<th width="30%"><?php echo __("Date"); ?></th>
				<th width="20%"><?php echo __("Home"); ?></th>
				<th width="20%"><?php echo __("Visitor"); ?></th>
				<th width="10%"><?php echo __("Time"); ?></th>
				<th width="20%"><?php echo __("Location"); ?></th>
			</tr>
			<?php foreach( $tab as $game ) : ?>
			<?php 
				$dateZend = new Zend_Date($game->getDate(), Jnd_Global_Constantes::FORMAT_DATE_WEB_LONG_ZEND_DATE, "en_US");
				$teamHome = new Administration_Model_Teams($game->getIdTeamHome()); 
				$teamVisi = new Administration_Model_Teams($game->getIdTeamVisitor()); 
				$location = new Administration_Model_Locations($game->getIdLocation());
			?>
			<tr>
				<td><?php echo $dateZend->get("EEEE dd MMMM y"); ?></td>
				<td><?php echo $teamHome->getName(); ?></td>
				<td><?php echo $teamVisi->getName(); ?></td>
				<td><?php echo $dateZend->get("TT"); ?></td>
				<td><?php echo $location->getName(); ?></td>
			</tr>
			<?php endforeach; ?>
		</table>
		<br />
		<?php endforeach; ?>
	</div>
</div>